<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>suzhu</title>
</head>
<body>
    <script>
    var arr=[8,6,6,6,88,8,5,6]
    
    var arrN=[];
    for(var i=0;i<arr.length;i++)
    {
        var n=0;
        for(var j=arr.length-1;j>i;j--)
        {
            if(arr[j]==arr[i])
            {
                n++;
            }

        }
        if(n==0)
        {
            arrN.push(arr[i]);
        }
    }
    console.log(arrN);
    </script>
</body>
</html>